package com.dushuren.project.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dushuren.project.model.entity.UserTeam;
import com.dushuren.project.model.vo.TeamApplyVo;
import com.dushuren.project.model.vo.UserTeamVo;

/**
* @author qieqie
* @description 针对表【user_team(队伍成员关系管理)】的数据库操作Service
* @createDate 2022-10-17 12:35:33
*/
public interface UserTeamService extends IService<UserTeam> {

  /***
   * 获取当前加入队伍的数量
   * @param userId
   * @return
   */
  Long QueryUserTeam(Long userId);


  /***
   * 获取当前队伍中的人数
   * @param teamId
   * @return
   */
  Long QueryTeamNum(Long teamId);


  /***
   * 当前用户是否已加入队伍
   * @param teamId
   * @return
   */
  Long QueryTeamNum(Long teamId, Long userId);

  /**
   * 查看当前人员是否存在于当前队伍中 （一个对象）
   * @param teamId
   * @param userId
   * @return
   */
  UserTeamVo isIdTeamExist(Long teamId, Long userId);
}
